import { BroadCastCall } from "../../broadCast/BroadCastCall";
import { MessageBlock } from "../../../../../Framework/MQ/MessageBlock";
import { SContriShopBuyRecord } from "../../../../../Message/Public/SContriShopBuyRecord";
import { GangFightShopBuyLimitInfo } from "../../../view/shop/info/GangFightShopBuyLimitInfo";
import { NetDispatcher } from "../../../../mvc/core/NetDispatcher";
import { ServerCommand } from "../../../mvc/ServerCommand";
//class GangFightShopBuyRecordCommandEx
    
    export  class GangFightShopBuyRecordCommandEx extends BroadCastCall
    {
        constructor(arg1: Object)
        {
            super(arg1);
            return;
        }

        public /* override */ call(arg1: MessageBlock): void
        {
            var loc4=null;
            super.call(arg1);
            var loc1=arg1.messageBase as SContriShopBuyRecord;
            var loc2=loc1.record;
            var loc3=_cache.shop.gangFightShopBuyLimitInfo;
            var loc5=0;
            var loc6=loc2;
            for (loc4 in loc6) 
            {
                loc3.updateBuyLimit(parseInt(loc4), parseInt(loc2[loc4]), GangFightShopBuyLimitInfo.KEY_NUM);
            }
            NetDispatcher.dispatchCmd(ServerCommand.GangFightShopBuyRecordCommand, loc3);
            return;
        }
    }
